.TH std::atomic_ref::store 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::atomic_ref::store \- std::atomic_ref::store

.SH Synopsis
   void store( T desired, std::memory_order order =                       \fI(since C++20)\fP
   std::memory_order_seq_cst ) const noexcept;

   Atomically replaces the current value of the referenced object with desired. Memory
   is affected according to the value of order.

   order must be one of std::memory_order_relaxed, std::memory_order_release or
   std::memory_order_seq_cst. Otherwise the behavior is undefined.

.SH Parameters

   desired - the value to store into the referenced object
   order   - memory order constraints to enforce

.SH Return value

   \fI(none)\fP

.SH See also

   operator= stores a value into the object referenced by an atomic_ref object
             \fI(public member function)\fP
